﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace DevToolBox.Cloud.Common
{
    /// <summary>
    /// Interface to abstract the interaction with 
    /// third party/cloud queue-like services
    /// </summary>
    public interface IQueueable
    {
        /// <summary>
        /// Method to send a message to the queue
        /// </summary>
        void Set(object[] keys);

        /// <summary>
        /// Method to get the number of messages stored in the queue
        /// </summary>
        int GetSize(object[] keys);

        /// <summary>
        /// Method to get a message from the queue service
        /// </summary>
        /// <param name="key">Key to construct the queue get request</param>
        /// <returns>Last item added to the queue</returns>
        object Get(object key);

        /// <summary>
        /// Method to delete a message from the queue service
        /// </summary>
        /// <param name="key">Key to get the message to delete</param>
        void Delete(object[] keys);

        /// <summary>
        /// Method to dispose the unmanaged resources
        /// </summary>
        void Dispose();
    }
}
